#pragma once

#include <cstdint>
#include <avr/io.h>

namespace hw {

using TimerCallback = void (*)();

struct Timer {
  static void start();
  inline static uint8_t read_reset() {
      auto val = TCNT0;
      TCNT0 = 0;
      return val;
  }

#if 0
  static void spawn(uint8_t mks, TimerCallback callback);
#endif
  static void cancel();
};

} // namespace hw
